package com.opesoft.app.system.model;

import java.util.List;

import javax.persistence.Basic;
import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Lob;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.TableGenerator;

@Entity
@Table(name="dictionary_config")
public class DictionaryConfig
{
	@Id
	@GeneratedValue(strategy=GenerationType.TABLE, generator="DictionaryConfigIdGenerator")
	@TableGenerator(name="DictionaryConfigIdGenerator", table="ids", pkColumnName="entity", valueColumnName="maxid", pkColumnValue="DictionaryConfig", allocationSize=1)
	private long id; // 主键

	@Basic
	private String code; // 代码

	@Basic
	private String name; // 名称

	@Lob
	private String remark; // 说明

	@OneToMany(cascade=CascadeType.ALL, targetEntity=Dictionary.class, mappedBy="dictionaryConfig")
	List<Dictionary> list; // 字典项

	public String getCode()
	{
		return code;
	}

	public void setCode(String code)
	{
		this.code=code;
	}

	public String getRemark()
	{
		return remark;
	}

	public void setRemark(String remark)
	{
		this.remark=remark;
	}

	public long getId()
	{
		return id;
	}

	public void setId(long id)
	{
		this.id=id;
	}

	public String getName()
	{
		return name;
	}

	public void setName(String name)
	{
		this.name=name;
	}

	public List<Dictionary> getList()
	{
		return list;
	}

	public void setList(List<Dictionary> list)
	{
		this.list=list;
	}

}
